﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<QianBuo.Lottery.Web.Models.Scheme.DetailModel>" %>
<%@ Import Namespace="Code.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	方案详情
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<fieldset>
    <legend>方案详情</legend>
    <div>
    <%if (Model.Scheme != null)
      { 
          var s=Model.Scheme;
          %>
        <table width="100%" class="table">
            <tr class="th">
                <th colspan="8">当前方案详情</th>
            </tr>
            <tr>
                <td class="tdth">彩&nbsp;&nbsp;&nbsp;&nbsp;种:</td>
                <td><%=s.LotteryName %></td>
                <td class="tdth">期&nbsp;&nbsp;&nbsp;&nbsp;号:</td>
                <td><%=s.IssueNumber %></td>
                <td class="tdth">奖金模式:</td>
                <td><%=s.WinModelName %></td>
                <td class="tdth">元角模式:</td>
                <td><%=s.ConsumptionRatioName %></td>
            </tr>
            <tr>
                <td class="tdth">方案注数:</td>
                <td><%=s.SchemeCount %></td>
                <td class="tdth">方案倍数:</td>
                <td><%=s.SchemeMultiple%></td>
                <td class="tdth">方案金额:</td>
                <td><%=s.SchemeMoney %></td>
                <td class="tdth">开奖号码:</td>
                <td><%=s.SchemeOpenCode %></td>
            </tr>
            <tr>
                <td class="tdth">方案奖金:</td>
                <td><font color="red"><%=s.SchemeWinMoney.HasValue?s.SchemeWinMoney.Value.ToString("C"):null %></font></td>
                <td class="tdth">是否追号:</td>
                <td><%=s.IsChaseTask?"是":"否" %></td>
                <td class="tdth">状&nbsp;&nbsp;&nbsp;&nbsp;态:</td>
                <td><%=((SchemeState)s.SchemeState).GetName() %></td>
                <td class="tdth">添加时间:</td>
                <td><%=s.AddTime %></td>
            </tr>
        </table>
    <%} %>
        <p />
        <table class="table" width='100%'>
            <tr class="th">
                <th >玩法</th><th>购买的号码</th><th >注数</th><th >返点加奖</th><th >金额</th><th >中奖号码</th><th >中奖金额</th>
            </tr>
            <% 
                var i = 0; foreach (var detail in Model.DetailList)
                {
                    var moneyTitle =detail.BackMoneyToWinMoneyToWin.HasValue ? string.Format("原始奖金:{0:C} 返点加奖:{1:C}", detail.OriginalWinMoney, detail.BackMoneyToWinMoneyToWin) : string.Empty;
            %>
            <tr <%=i++ % 2 == 1 ? "class='supersede'" : "" %>>
                <td><%=((PlayType_E)detail.PlayType).GetName()%></td>
                <td><div class="numberitem"><%=detail.DetailNumber %></div></td>
                <td><%=detail.DetailCount%></td>
                <td><%=detail.BackMoneyToWinMoney.HasValue ? detail.BackMoneyToWinMoney + "%" : "--" %></td>
                <td><%=detail.DetailMoney.ToString("C")%></td>
                <td><%=(detail.DetailWinNumber ?? "" ).Replace("&", ",")%></td>
                <td class="tdright" title="<%=moneyTitle %>"><font color="red"><%=detail.DetailWinMoney.HasValue ? detail.DetailWinMoney.Value.ToString("C") : null %></font></td>
            </tr>
                  <%
                } 
                      var page=Model.pageInfo;
                      if(page!=null){
                      %>
              <tr>
                <td colspan='7' align="center">
                    <%=Html.Pager(page.CurrPage, page.PageCount, page.SunCount,"pageInfo.CurrPage",  Url.Route(new {Model.where,Model.SI_Pg,Model.SchemeID,returnUrl=Request["returnUrl"]}),"pageInfo.PageCount")%>
                </td>
              </tr>
              <%} %>
        </table>
        <p></p>
        <% if (Model.ChaseDetailList != null && Model.ChaseDetailList.Count() > 0){ %>
        <table class="table" width="100%">
            <tr class="th">
                <th>期号</th><th>金额</th><th>倍数</th><th>状态</th><th>开奖号码</th>
            </tr>
            <%var j = 0; foreach (var item in Model.ChaseDetailList)%>
            <% { %>
            <tr <%=j++%2==1?"class='supersede'":"" %> id='tr_<%=j %>'>
                <td><%=item.IssueNumber%></td>
                <td><%=item.Money.ToString("C")%></td>
                <td><%=item.Multiple%></td>
                <td class='td_<%=j %>'><%=item.State==(short)ChaseTaskState.Normal?"正在进行":((ChaseTaskState)item.State).GetName()%></td>
                <td><%=item.OpenCode %></td>
            </tr>
            <%} %>
        </table>
            <p></p>
        <%} %>
        <div align="left">
            <a href='<%=Request["ReturnUrl"]??Url.Action("History", Url.Route(new { Model.where, pageInfo = new { CurrPage = Model.SI_Pg } })) %>' class="a_blue">&gt;&gt;返回</a>
        </div>
    </div>
</fieldset>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StyleAndScript" runat="server">
    <style type="text/css">
        .tdth{ font-weight:500;}    
    </style>
</asp:Content>
